/**
 * 
 */
package com.base;

import java.util.List;
import java.util.Map;

import com.base.dao.BaseDao;

/**
 * @author 4833 robben
 * 2014-5-10 下午3:04:17
 */
public abstract class Operation<T extends Target> extends Target {
	// TODO: inject this object with spring.
	private BaseDao baseDao = new BaseDao();
	
	public BaseDao getBaseDao() {
		return baseDao;
	}
	public void setBaseDao(BaseDao baseDao) {
		this.baseDao = baseDao;
	}
	
	public abstract boolean checkRight(String usergroupCode, String targetCode);
	
	public abstract String add(T t);
	public abstract boolean remove(T t);
	public abstract boolean modify(T t);
	public abstract T findByIdentity(String identity);
	public abstract List<T> retrieve();
	public abstract List<T> find(Condition condition);
	public abstract List<T> find(Map<String, String> parameter);
}
